package edu.udo.sopra10.chaturaji.util;

/**
 * This is the default implementation of the {@link Clonable} interface. This
 * implementation just wraps {@link Object#clone()} to implement
 * {@link Clonable#clone()}. By contract, a {@link CloneNotSupportedException}
 * MUST NOT be thrown, if it is, the exception is wrapped in an
 * {@link IllegalStateException} to indicate the breach of contract.
 * 
 * @author Simon Dierl
 */
public class SimpleClonable implements Clonable {
	@Override
	public Object clone() {
		try {
			return super.clone();
		} catch (final CloneNotSupportedException e) {
			throw new IllegalStateException(e);
		}
	}
}
